import React, { useState } from 'react'

export default function CounterFn() {
  const [counter, setCounter] = useState(100)
  // const handleAddCounter = () => {
  //   setCounter(counter + 1)
  // }
  return (
    <div>
      <h1>当前计数为：{counter}</h1>
      <button onClick={() => setCounter(counter + 1)}>+</button>
    </div>
  )
}
